package com.yimi.appstore.view;

import android.content.Context;
import android.util.AttributeSet;

import com.yimi.appstore.R;

/**
 * 重写ListView，实现向下拉加载，滑动最后加载功能
 * @author Tank
 *
 */
public class MyListView extends SListView{

	public MyListView(Context context) {
		super(context);
	}
	public MyListView(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.context=context;
	}
	/**
	 *初始化头部UI
	 */
	public void initHeadView(){
		HeadViewModel model=new HeadViewModel();
		model.setHeadViewId(R.layout.listview_head).setArrowId(R.id.head_arrowImageView)
			.setProgressBarId(R.id.head_progressBar).setTipsId(R.id.head_tipsTextView)
			.setLastUpdatedId(R.id.head_lastUpdatedTextView);
		initHeadView(model);
	}
	/**
	 * 初始化脚部UI
	 */
	public void initFootView(){
		initFootView(R.layout.listview_foot, R.id.ll_footview);
	}
	/**
	 * 初始化头部和脚部UI
	 */
	public void initHeadFootView(){
		initHeadView();
		initFootView();
	}
	

}
